﻿<div class="text-center ma-2">
    <MButton OnClick="Show" Dark>
        Open Snackbar
    </MButton>
    <MSnackbar @bind-Value="_show" Dark>
        <ChildContent>
            Hello, I'm a snackbar
        </ChildContent>
        <ActionContent>
            <MButton Color="pink" Text OnClick="Close">
                Close
            </MButton>
        </ActionContent>
    </MSnackbar>
</div>

@code{
    private bool _show;

    public void Show()
    {
        _show = true;
    }

    public void Close()
    {
        _show = false;
    }
}
